{layout name="admin:main" /}
<table class="table table-border">
<thead>
    <tr>
        <th class="w100 fn-tac">操作</th>
        <th class="w120"></th>
        <th>应用名称</th>
        <th class="w60">版本</th>
        <th class="w100 fn-tar">活动价</th>
        <th class="w100 fn-tar">市场价</th>
        <th class="w70 fn-tac">状态</th>
    </tr>
</thead>
<tbody>
{foreach $list as $rs}
    <tr>
        <td class="fn-tac">
            <a href="javascript:;" class="button" title="选择" data-id="{$rs.id}"><i class="iconfont icon-affirm_icon"></i>选择</a>
        </td>
        <td class="fn-tac"><img src="__STATIC__/{$rs.miniapp_dir}/logo.png" class="w80"></td>
        <td>{$rs.title}</td>
        <td>{$rs.version}</td>
        <td class="fn-tar">￥{$rs.sell_price}</td>
        <td class="fn-tar">￥{$rs.market_price}</td>
        <td class="fn-tac li">{if $rs.is_lock}<span class="badge bg-red">锁定</span>{else}<span class="badge">正常</span>{/if}</td>
    </tr>
{/foreach}
</tbody>
</table>
<div class="page">{$list|raw}</div>
<script type="text/javascript">
    Do('base','layer',function(){
        var index = parent.layer.getFrameIndex(window.name);
        $('.button').click(function(){
            var member_id = $(this).attr('data-id');
            parent.$("#iframe").contents().find("#{$input}").val(member_id);  
            parent.layer.close(index); 
        });
    })
</script>